package aom.ju.ss.view.dialog

import android.app.Activity
import android.content.Intent
import aom.ju.ss.R
import aom.ju.ss.databinding.NoSetPostageTemplateBinding
import aom.ju.ss.view.user.shop.management.freightTemplate.EditShippingTemplate
import aom.ju.ss.view.user.shop.management.freightTemplate.NewShippingTemplate
import com.google.gson.Gson

/**
 * 新增运费模板
 */
class NoSetPostageTemplate(activity: Activity?) :
    BaseDialog(activity) {


    lateinit var binding: NoSetPostageTemplateBinding


//    新增运费模版
//    /apicloud/ShopShipping/addShipping
//    api_version:v2
//    token:81547b2be4445228e2217421f1957f75c05bd76b
//    client_id:1
//    platform:android
//    shop_id:53 //店铺的id    必填
//    type:3  //模版类型   1特惠邮费 2常规邮费 3偏远地区邮费 4不配送区域
//    province:["西藏","新疆","内蒙古","黑龙江"]  //配送区域, json格式

    override fun init() {
        binding = vBinding as NoSetPostageTemplateBinding

        binding.gb.setOnClickListener {
            dis()
        }

        binding.set.setOnClickListener {
//            activity.startActivityForResult(Intent(activity, ShippingTemplateSettings::class.java),999)

            activity.startActivityForResult(
                Intent(activity, NewShippingTemplate::class.java), 999
            )
            dis()
        }


    }


    override fun getLay(): Int {
        return R.layout.no_set_postage_template
    }
}
